home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmCT_307_zModelessDialog < prev    next >
Encoding:
Text File  |  1990-03-23  |  1.5 KB  |  64 lines

  1. /* %filename% -- modeless dialog methods */
  2. /* Created %date% %time% by AppMaker */
  3.  
  4. /*    We recommend that you not modify this module and instead modify        */
  5. /*    its subclass, %dlogname%.  The 'z' prefix on this module marks%        %*/
  6. /*    a module which is likely to be regenerated by AppMaker after you    */
  7. /*    make changes to the user interface.  The modules without the 'z'    */
  8. /*    prefix will not be regenerated by AppMaker unless you delete them.    */
  9. /*    Using a separate subclass to override the AppMaker-generated code    */
  10. /*    lets you regenerate code without losing your hand-coded changes.    */ 
  11.  
  12. #include <Commands.h>
  13. #include <CDesktop.h>
  14. #include <CDialog.h>
  15. #include <CRadioGroup.h>
  16. #include "z%dlogname%.h"
  17.  
  18. extern CDesktop        *gDesktop;
  19.  
  20. #define %dlogname%ID    %rsrcID% 
  21.  
  22. /*----------*/
  23. void    Z%dlogname%::I%dlogname%    (CBureaucrat        *aSupervisor)
  24. {
  25.     CDialog            *itsDialog;
  26.     CView            *enclosure;
  27.     CBureaucrat        *supervisor;
  28.     CPane            *itsMainPane;
  29.     CRadioGroup        *aGroup;
  30.  
  31.     inherited::IDirector (aSupervisor);
  32.  
  33.     itsDialog = new (CDialog);
  34.     itsDialog->IDialog (%rsrcID%, gDesktop, this);
  35.     itsWindow = itsDialog;
  36.  
  37.     enclosure = itsDialog;
  38.     supervisor = this;
  39.     %for each item gen create%
  40.  
  41. } /* I%dlogname% */
  42.  
  43. %for each item gen zMake%
  44. /*----------*/
  45. void    Z%dlogname%::CloseWind    (CWindow    *theWindow)
  46. {
  47.     theWindow->Hide ();
  48. } /* CloseWind */
  49.  
  50. /*----------*/
  51. void    Z%dlogname%::DoCommand    (long        theCommand)
  52. {
  53.     switch (theCommand) {
  54.         case cmdClose:
  55.                 CloseWind (itsWindow);
  56.             break;
  57.         default:
  58.                 inherited::DoCommand (theCommand);
  59.             break;
  60.     } /* switch */
  61.  
  62. } /* DoCommand */
  63.     
  64. /* %unitname% */